/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.plotnikov.pricemaker.db;

import java.util.List;
import java.util.Vector;
import org.plotnikov.pricemaker.error.DBException;
import org.plotnikov.pricemaker.error.RootException;
import org.plotnikov.pricemaker.utils.DBEntity;

/**
 *
 * @author alexey
 */
public interface DBOperations {

    public void initDB() throws RootException;

    public List<Object[]> getListPrices() throws RootException;

    public void test1();

    public void test2();

    public void addOrganisation(String name) throws DBException;

    public void updateOrganisation(Integer id, String name) throws DBException;

    public void deleteOrganisation(Integer id) throws DBException;

    public Vector<DBEntity> listOrganisations() throws DBException;

    public void addTitleProduction(String name) throws DBException;

    public void updateTitleProduction(Integer id, String name) throws DBException;

    public void deleteTitleProduction(Integer id) throws DBException;

    public Vector<DBEntity> listTitleProducts() throws DBException;

    public void addProduction(Integer id_org, Integer id_type, String name) throws DBException;

    public void updateProduction(Integer id, String name) throws DBException;

    public void deleteProduction(Integer id) throws DBException;

    public Vector<DBEntity> listProducts(Integer id_org, Integer id_type) throws DBException;

    public void addPostavchik(String name) throws DBException;

    public void updatePostavchik(Integer id, String name) throws DBException;

    public void deletePostavchik(Integer id) throws DBException;

    public Vector<DBEntity> listPostavchiki() throws DBException;

    public void addPriceFor(String name) throws DBException;

    public void updatePriceFor(Integer id, String name) throws DBException;

    public void deletePriceFor(Integer id) throws DBException;

    public Vector<DBEntity> listPricesFor() throws DBException;

    public Vector<DBEntity> searchPriceLists(String search) throws DBException;

    public void addPricer(DBEntity e) throws DBException;

    public void updatePricer(DBEntity e) throws DBException;

    public void deletePricers(int[] ids) throws DBException;

    public DBEntity getPricerObj(int id) throws DBException;
}
